import Vue from 'vue'
import Router from 'vue-router'
import todo from '@/components/todo/todo'
// import login from '@/components/login/login'

Vue.use(Router)

export default new Router({
  mode:"history",
  base:"slp",
  fallback:true,
  routes: [
    {
     path: '/' ,
      redirect:'/login'
    },
    {
      path: '/app',
      name: 'todo',
      component: todo,
    },
    {
      path: '/login',
      name: 'login',
      component: ()=>import('@/components/login/login'),
      beforeEnter(to,from,next){
        console.log('beforeEnter')
        next()
      },
    }
  ]
})
